using Framework.Save.Interface;
using Framework.Utils;
using UnityEngine;

namespace Framework.Save
{
    /// <summary>
    /// 基于FileStream的方式读写数据
    /// </summary>
    public class SaveHandlerFileStream : ISaveHandler
    {
        public void WriteData(string path, string name, byte[] value)
        {
            if (value != null)
            { 
                FileHelper.WriteFile(path , name , value);
            }
        }
        public byte[] ReadData(string path, string name)
        {
            var bytes = FileHelper.ReadFile(path, name);
            return bytes;
        }
    }
}